using SheLife.Domain.Entities;

namespace SheLife.Domain.Interfaces.Repositories
{
    /// <summary>
    /// 角色菜单仓储接口
    /// </summary>
    public interface IRoleMenuRepository : IRepository<RoleMenu>
    {
        Task<IEnumerable<RoleMenu>> GetByRoleIdAsync(Guid roleId);
        Task<IEnumerable<RoleMenu>> GetByMenuIdAsync(Guid menuId);
        Task<RoleMenu> GetByRoleIdAndMenuIdAsync(Guid roleId, Guid menuId);
        Task<bool> IsRoleMenuExistsAsync(Guid roleId, Guid menuId);
        Task DeleteByRoleIdAsync(Guid roleId);
        Task DeleteByMenuIdAsync(Guid menuId);
    }
}